From: M A Young Date: Thu, 11 Apr 2013 23:02:11 +0000 (+0100) Subject: libxl: beautify json with YAJL2 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7039 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=c1f0b214536773630cd5f16bf3d275015373555b;p=xen.git libxl: beautify json with YAJL2 xl list -l should produce readable output when built with yajl2 so it is compatible with the xendomains script. Signed-off-by: Michael Young Acked-by: Ian Campbell --- diff --git a/tools/libxl/libxl_json.h b/tools/libxl/libxl_json.h index 1464459141..a4dd8fcaca 100644 --- a/tools/libxl/libxl_json.h +++ b/tools/libxl/libxl_json.h @@ -54,7 +54,11 @@ static inline yajl_handle libxl__yajl_alloc(const yajl_callbacks *callbacks, static inline yajl_gen libxl_yajl_gen_alloc(const yajl_alloc_funcs *allocFuncs) { - return yajl_gen_alloc(allocFuncs); + yajl_gen g; + g = yajl_gen_alloc(allocFuncs); + if (g) + yajl_gen_config(g, yajl_gen_beautify, 1); + return g; } #else /* !HAVE_YAJL_V2 */